package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.pojo.entity.Inventory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface InventoryMapper extends BaseMapper<Inventory> {
    @Select("select count(*) from inventory where storage_id=#{storageId}")
    int selectCountById(int storageId);
    @Select("select * from inventory where storage_id=#{storageId} and component_id=#{componentId}")
    Inventory selectByIds(@Param("storageId")int storageId, @Param("componentId")int componentId);
}
